New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge insteon_plm and insteon_local to insteon component #16102
Conversation
@asyncio.coroutine | ||
def async_setup(hass, config): | ||
"""Setup the insteon_plm component.""" | ||
_LOGGER.warning('The insteon_plm comonent has been replaced by ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make it a persistent notification for more visibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I added that to both insteon_plm and insteon_local.
This looks great! Up to you if you want to keep with the warning or want to make it a persistent notification. We probably also want a comment that we should remove the old platforms in a couple of releases. |
'The insteon_plm has been replaced by the insteon component.<br />' | ||
'Please see https://home-assistant.io/components/insteon', | ||
title='insteon_local Component Deactivated', | ||
notification_id='insteon_plm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
hass.components.persistent_notification.create( | ||
'The insteon_plm has been replaced by the insteon component.<br />' | ||
'Please see https://home-assistant.io/components/insteon', | ||
title='insteon_local Component Deactivated', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
|
||
hass.components.persistent_notification.create( | ||
'The insteon_plm has been replaced by the insteon component.<br />' | ||
'Please see https://home-assistant.io/components/insteon', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
_LOGGER.warning('Please see https://home-assistant.io/components/insteon') | ||
|
||
hass.components.persistent_notification.create( | ||
'The insteon_plm has been replaced by the insteon component.<br />' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
'The insteon_local has been replaced by the insteon component.<br />' | ||
'Please see https://home-assistant.io/components/insteon', | ||
title='insteon_local Component Deactivated', | ||
notification_id='insteon_local') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
hass.components.persistent_notification.create( | ||
'The insteon_local has been replaced by the insteon component.<br />' | ||
'Please see https://home-assistant.io/components/insteon', | ||
title='insteon_local Component Deactivated', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
|
||
hass.components.persistent_notification.create( | ||
'The insteon_local has been replaced by the insteon component.<br />' | ||
'Please see https://home-assistant.io/components/insteon', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
_LOGGER.warning('Please see https://home-assistant.io/components/insteon') | ||
|
||
hass.components.persistent_notification.create( | ||
'The insteon_local has been replaced by the insteon component.<br />' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line missing indentation or outdented
|
||
return True | ||
"""Setup the insteon_local component. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
@asyncio.coroutine | ||
def async_setup(hass, config): | ||
"""Setup the insteon_plm component. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
I added the note to remove in release 0.90. I figured this should be plenty of time for people who don't upgrade regularly. I think you are on a 2 week release cycle so this would be 13 releases or 26 weeks. |
Perfect, awesome work. |
I have a question. I have BOTH a PLM and a Hub connected in my setup and they work just fine. Like this:
Will I have to choose which one I want to use or can I configure both at the same time using the new configuration? |
Not a use case I had ever considered so, yes. Just out of curiosity, why do you do this? |
Well, the main reason is that HA did not support leak sensors connected to the Hub. Maybe that's changed now. The way I have it set up now is that all my light switches at connected to the Hub and the leak sensors are connected to the PLM. They both work fine. |
Yes, all of the devices work with the Hub in the new design. But we should not comment in the PR. We can move the disucssion here: https://community.home-assistant.io/t/merging-insteon-plm-and-insteonlocal/60323/9 |
…ant#16102) * Implement X10 * Add X10 after add_device_callback * Ref device by id not hex and add x10OnOffSwitch name * X10 services and add sensor device * Correctly reference X10_HOUSECODE_SCHEMA * Log adding of X10 devices * Add X10 All Units Off, All Lights On and All Lights Off devices * Correct ref to X10 states vs devices * Add X10 All Units Off, All Lights On and All Lights Off devices * Correct X10 config * Debug x10 device additions * Config x10 from bool to housecode char * Pass PLM to X10 device create * Remove PLM to call to add_x10_device * Unconfuse x10 config and method names * Correct spelling of x10_all_lights_off_housecode * Bump insteonplm to 0.10.0 to support X10 * Add host to config options * Add username and password to config for hub connectivity * Add username and password to config for hub * Convert port to int if host is defined * Add KeypadLinc * Update config schema to require either port or host * Solidify Hub and PLM configuration to ensure proper settings * Update hub schema * Bump insteonplm version * Fix pylint and flake issues * Bump insteonplm to 0.12.1 * Merge insteon_plm and insteon_local to insteon * Rename insteon_plm to insteon * Bump insteonplm to 0.12.2 * Flake8 cleanup * Update .coveragerc for insteon_plm, insteon_local and insteon changes * Add persistent notification * Fix reference to insteon_plm * Fix indentation * Shorten message and fix grammer * Add comment to remove in release 0.90 * Hound fix
Description:
The insteon_plm and insteon_local components both provide Insteon services for the two different interfaces (PLM and Hub respectively). This PR merges the two so that only one component will serve both Insteon PLM and Insteon Hub users. The summary of changes is:
insteonplm
)Related issue (if applicable): fixes #13178
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#6057
Example entry for
configuration.yaml
(if applicable):or
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: